/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.shop.dao.order;

import java.util.List;
import java.util.Map;

import com.thinkgem.jeesite.common.persistence.CrudDao;
import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import com.thinkgem.jeesite.modules.shop.entity.order.ShopOrder;

/**
 * 购物订单DAO接口
 * 
 * @author JiangYongKang
 * @version 2016-12-19
 */
@MyBatisDao
public interface ShopOrderDao extends CrudDao<ShopOrder> {
	
	public ShopOrder findByCoNum(String coNum);

    public ShopOrder findById(String id);

    public List<ShopOrder> findByAccountId(ShopOrder shopOrder);
    
    public int insertOrder(ShopOrder order);
    
    public void updateOrderForPaySuccess(ShopOrder shopOrder);
    
    public String getLastCode(Map<String,String> paramMap);

    public Long countOrderByStatus(Short status);

	public void updateDelete(String id);
	
	public List<ShopOrder> findNewList();
	
	public void cancelOrder(ShopOrder shopOrder);
	
	public void updateOrderStatusForRefund(ShopOrder shopOrder);

	public Long messageOrderCount();
}